All Questions
2 questions
-1votes
3answers
872views
Would Injecting dependencies in C# as default parameters be a bad practice?
Given the (old) debate over whether Singletons are overused/abused/are worth it - would it be a bad idea to inject the dependencies as default parameters? In this way, we could get rid of defining ...
18votes
4answers
6kviews
Should injecting dependencies be done in the ctor or per method?
Consider: public class CtorInjectionExample { public CtorInjectionExample(ISomeRepository SomeRepositoryIn, IOtherRepository OtherRepositoryIn) { this._someRepository = ...